//
//  HRTabBarItem.m
//  网易彩票
//
//  Created by rui on 6/30/15.
//  Copyright © 2015 loverforevercyr. All rights reserved.
//

#import "HRTabBarItem.h"
@implementation HRTabBarItem

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

/**
*  构造方法
*
*  @param title         按钮的标题
*  @param image         按钮的图片
*  @param selectedImage 按钮选中时的图片
*
*  @return 返回一个构造成功的HRTabBarItem对象
*/
+ (instancetype)tabBarItemWithTitle:(NSString *)title image:(UIImage *)image selectedImage:(UIImage *)selectedImage {
    return [[self alloc] initWithTitle:title image:image selectedImage:selectedImage];
}

/**
 * 对象方法，构造方法
 *
 *  @param title         标题
 *  @param image         图片
 *  @param selectedImage 选中时的图片
 *
 *  @return 返回一个构造成功的HRTabBarItem对象
 */
- (instancetype)initWithTitle:(NSString *)title image:(UIImage *)image selectedImage:(UIImage *)selectedImage {
    if (self = [super init]) {
        self.title = title;
        self.image = image;
        self.selectedImage = selectedImage;
    }
    
    return self;
}
@end
